<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>寻ta千百度</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="js/jquery-3.3.0.js" ></script>
    <script type="text/javascript" src="js/bootstrap.min.js" ></script>
    <script type="text/javascript" src="js/popper.min.js" ></script>
</head>
<body>
    ${info}

    <div id="content" style="height: 1200px;">
        <table class="table table-striped" style="border-bottom: 1px solid #ddd;margin-bottom: 5px;">
            <tr>
                <th>类型</th>
                <th>信息标题</th>
                <th>酬谢方式</th>
                <th>联系人</th>
                <th>发布时间</th>
            </tr>
            <#list info.list as msg>
                <tr>
                    <td>寻物</td>
                    <td><a href="/detail?id=1">${msg.title}</a></td>
                    <td style="color: red;">
                        <#assign way = "">
						<#if msg.thanks==1>
                            <#assign way=way+"通过平台感谢信酬谢">
                        </#if>
                        <#if way!=""&&msg.promise==1>
                            <#assign way=way+"+">
                        </#if>
                        <#if msg.promise==1>
                            <#assign way=way+"酬金【"+msg.remuneration+"】">
                        </#if>
                        <#if way=="">
                            <#assign way="无">
                        </#if>
                        ${way}
                    </td>
                    <td>${msg.contactPerson}</td>
                    <td>${(msg.createTime?string("yyyy-MM-dd HH:mm:ss"))!.now}</td>
                </tr>
            </#list>

        </table>
        <div style="float: right;margin-right: 20px;">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <#if info.isFirstPage>
                        <li class="disabled">
                          <span>
                            <span aria-hidden="true">&laquo;</span>
                          </span>
                        </li>
                    <#else>
                        <li>
                            <a href="/hello?pageNum=${info.prePage}&pageSize=5&type=0" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                    </#if>
                    <#list 1..info.pages as i>
                        <#if info.pageNum==i>
                            <li class="active"><a href="/hello?pageNum=${i}&pageSize=5&type=0">${i}</a></li>
                        <#else>
                            <li><a href="/hello?pageNum=${i}&pageSize=5&type=0">${i}</a></li>
                        </#if>

                    </#list>

                    <#if info.isLastPage>
                        <li class="disabled">
                          <span>
                            <span aria-hidden="true">&raquo;</span>
                          </span>
                        </li>
                    <#else>
                        <li>
                            <a href="/hello?pageNum=${info.nextPage}&pageSize=5&type=0" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </#if>


                </ul>
            </nav>
        </div>

        <!--测试页码第一页和最后一页的激活状态-->
        <nav aria-label="Page navigation">
            <ul class="pagination">
                <li class="disabled">
			      <span>
			        <span aria-hidden="true">&laquo;</span>
			      </span>
                </li>
                <li class="active">
                    <span>1 <span class="sr-only">(current)</span></span>
                </li>
                <li class="disabled">
			      <span>
			        <span aria-hidden="true">&raquo;</span>
			      </span>
                </li>
            </ul>
        </nav>
</body>
</html>